package com.fin.quant.instra.mysql.model;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 组合持仓明细表（关联资产表）
 */
public class PortfolioPosition {
    /**
    * 主键ID
    */
    private Long id;

    /**
    * 关联组合ID
    */
    private Long portfolioId;

    /**
    * 关联资产ID（asset.id）
    */
    private Long assetId;

    /**
    * 持仓数量
    */
    private BigDecimal quantity;

    /**
    * 成本价
    */
    private BigDecimal costPrice;

    /**
    * 当前市价
    */
    private BigDecimal marketPrice;

    /**
    * 市值
    */
    private BigDecimal marketValue;

    /**
    * 占组合比例(%)
    */
    private BigDecimal weight;

    /**
    * 仓位类型，如 LONG 或 SHORT
    */
    private String positionType;

    /**
    * 创建时间
    */
    private Date createdAt;

    /**
    * 更新时间
    */
    private Date updatedAt;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPortfolioId() {
        return portfolioId;
    }

    public void setPortfolioId(Long portfolioId) {
        this.portfolioId = portfolioId;
    }

    public Long getAssetId() {
        return assetId;
    }

    public void setAssetId(Long assetId) {
        this.assetId = assetId;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(BigDecimal costPrice) {
        this.costPrice = costPrice;
    }

    public BigDecimal getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(BigDecimal marketPrice) {
        this.marketPrice = marketPrice;
    }

    public BigDecimal getMarketValue() {
        return marketValue;
    }

    public void setMarketValue(BigDecimal marketValue) {
        this.marketValue = marketValue;
    }

    public BigDecimal getWeight() {
        return weight;
    }

    public void setWeight(BigDecimal weight) {
        this.weight = weight;
    }

    public String getPositionType() {
        return positionType;
    }

    public void setPositionType(String positionType) {
        this.positionType = positionType;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }
}